package com.unionx.unionxuf.localdao;


import java.util.List;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.unionx.unionxuf.entity.CropDTD;
import com.unionx.unionxuf.entity.ReceivepayManger;
import com.unionx.unionxuf.entity.RmDTD;

@Repository
public interface ReceivepayMangerMapper {
    int deleteByPrimaryKey(Integer id);
    
    int insert(ReceivepayManger record);

    int insertSelective(ReceivepayManger record);

    ReceivepayManger selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ReceivepayManger record);

    int updateByPrimaryKey(ReceivepayManger record);
    int updatebyls(ReceivepayManger record);
    
    @Select("select * from receivepaymanger1 where corpid = #{0} and isno = #{1} and zhuangtai=#{2} ")
    List<ReceivepayManger>  selectBylsandCid(String cropid, String serialno,String zhuangtai);
    
    @Select("select * from receivepaymanger1 where  corpid = #{0} and isno = #{1} and  type = #{2} and zhuangtai=#{3}")
	List<ReceivepayManger> selectBylsandCidandType(String cropid, String serialno, String type,String zhuangtai);

	Object localgetXiaofei(String cropid);

	List<ReceivepayManger> selectByDtd(CropDTD dtd);

	int delRecivepay(ReceivepayManger r);

	List<String> finType(ReceivepayManger r);

	int updateCtype(ReceivepayManger rm);
	
	int insert1(ReceivepayManger receivepayManger);

	ReceivepayManger selectby(ReceivepayManger rm);

	String selectbbbb(ReceivepayManger r);
	@Select("select * from receivepaymanger where corpid=#{1}")
	List<ReceivepayManger> selectrm(String cropid);

	@Select("select id, TYPE, subjectcode, subjectname,corp,amount,corpid,isno,remark,zhuangtai,shenhezhuangtai from view_receivepaymanger1 where  corpid = #{0} and isno = #{1} and  type = #{2}")
	List<ReceivepayManger> getRM(String cropid, String serialno, String type);

	int deletebycidandlsh(CropDTD c);
	
	@Select("select * from receivepaymanger1 where corpid = #{0} and isno = #{1}")
	List<ReceivepayManger> selectBylsandCidss(String cropid, String serialno);

	int updateCtype2(ReceivepayManger rm);

	
	@Select(" select type,subjectcode,subjectname,corp,amount,corpid,isno,remark,zhuangtai from receivepaymanger where type=#{0} and corp=#{1}")
	RmDTD selectby2(int type, String string);

	


	

}